package generics;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * @ClassName:
 * @Description:
 * @Author: yuanjiang
 * @Date: 2024-07-27 13:42
 **/
public class Demo {
    public static void main(String[] args) {
        ArrayList list = new ArrayList();
        list.add("aaa");
        list.add(123);

        Iterator it = list.iterator();
        while(it.hasNext()){
            Object next = it.next();
            System.out.println(next);
        }

    }
}
